<template>
  <zh-form :model="state.wtTaskAllocationLog" label-width="150px">
    <zh-form-input prop="taskRealProgressLabel" label="任务进度"  :span="12"
                   v-model="state.wtTaskAllocationLog.taskRealProgressLabel"></zh-form-input>
    <zh-form-input
        :span="24"
        prop="taskDescribe"
        label="说明"
        type="textarea" :row="5"
        v-model="state.wtTaskAllocationLog.taskDescribe"
    ></zh-form-input>
    <zh-form-input
        :span="24"
        prop="taskRemarks"
        label="备注"
        type="textarea" :row="5"
        v-model="state.wtTaskAllocationLog.taskRemarks"
    ></zh-form-input>
  </zh-form>
</template>

<script lang="ts" setup name="formForExecuteWtTask">
import {defineProps, nextTick, onMounted, reactive,watch} from "vue";
import {theme} from "@/store";
const emits = defineEmits(['update:taskRealProgressLabel']);
const props = defineProps({
  taskRealProgressLabel: {
    type: String,
    required: false,
    default: () => {
      return undefined;
    },
  },
})


const state = reactive({
  wtTaskAllocationLog: {
    taskRealProgressLabel: undefined,
    taskDescribe: undefined,
    taskRemarks: undefined
  }
})

onMounted(() => {
  nextTick(() => {
    state.wtTaskAllocationLog.taskRealProgressLabel = props.taskRealProgressLabel;
  });
});

watch(
    () => state.wtTaskAllocationLog.taskRealProgressLabel,
    () => {
      emits('update:taskRealProgressLabel', state.wtTaskAllocationLog.taskRealProgressLabel);
    }
);

const getData = ()=>{
  return state.wtTaskAllocationLog;
}

defineExpose({
  getData
})
</script>

<style scoped>

</style>